/**
 * 
 */
package com.sci.web.daoimpl;

import java.util.List;
import java.util.Map;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.sci.web.bean.Enterprise_Standard;

/**
 * @author  BaiFuyou
 * @date: Nov 4, 2011 10:17:09 PM
 * 
 *   数据上报
 * 基本信息
 * 技术标准制定
 */
public class DataReportM_StandardDao extends SqlMapClientDaoSupport implements com.sci.web.dao.DataReportM_StandardDao {

	/* (non-Javadoc)
	 * @see com.sci.web.dao.DataReportM_StandardDao#getAllEnterpriseStandardById(int)
	 */
	@SuppressWarnings("unchecked")
	@Override
	public List<Enterprise_Standard> getAllEnterpriseStandardById(int userid) {
		// TODO Auto-generated method stub
		return super.getSqlMapClientTemplate().queryForList("datereportseason.getallEnterprise_StandardByuserid",userid);
	}

	/* (non-Javadoc)
	 * @see com.sci.web.dao.DataReportM_StandardDao#getEnterpriseIdByUserid(int)
	 */
	@Override
	public int getEnterpriseIdByUserid(int userid) {
		// TODO Auto-generated method stub
		return (Integer)super.getSqlMapClientTemplate().queryForObject("datereportseason.getenid",userid);
	}

	@Override
	public boolean insertNewEnterpriseStandardData(Enterprise_Standard es) {
		// TODO Auto-generated method stub
		return (Integer)super.getSqlMapClientTemplate().insert("datereportseason.addnewenterprisestandarddata",es)>0?true:false;
	}

	@Override
	public boolean updateEnterpriseStandardData(Enterprise_Standard es) {
		// TODO Auto-generated method stub
		return (Integer)super.getSqlMapClientTemplate().update("datereportseason.updateenterprisestandarddata",es)>0?true:false;
	}

	@Override
	public boolean isEnterpriseStandardDataExist(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return (Integer)super.getSqlMapClientTemplate().queryForObject("datereportseason.isallEnterprise_StandardByuseridexist")>0?true:false;
	}

}
